//表格宽度自适应，这里的#dg是datagrid表格生成的div标签
function fitCoulms(){
    $('#tt').datagrid({
        fitColumns:true
    });
}


function turnOut() {
    flavr.confirm ("确认退出系统吗？", dmOut);
}
function dmOut() {

    $("#turn-out").css('display', 'block');
    var modalHeight=$(window).height() / 2 - $('#turn-out .modal-dialog').height() / 2;
    $("#turn-out").find('.modal-dialog').css({
        'margin-top': modalHeight
    });

    $("#turn-out").modal({
        keyboard: false,
        backdrop:'static'
    }).modal('show');


    setTimeout(function () {
        window.location.href = '/portal/doLogout.do';
    },1000)
}




